/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://code.google.com/p/google-apis-client-generator/
 * (build: 2014-06-09 16:41:44 UTC)
 * on 2014-06-19 at 21:37:58 UTC 
 * Modify at your own risk.
 */

package net.toby200.canalstoppages.stoppages.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Model definition for Location.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the stoppages. For a detailed explanation see:
 * <a href="http://code.google.com/p/google-http-java-client/wiki/JSON">http://code.google.com/p/google-http-java-client/wiki/JSON</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Location extends com.google.api.client.json.GenericJson implements Parcelable {

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Double lat;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Double lng;

  /**
   * @return value or {@code null} for none
   */
  public Double getLat() {
    return lat;
  }

  /**
   * @param lat lat or {@code null} for none
   */
  public Location setLat(Double lat) {
    this.lat = lat;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public Double getLng() {
    return lng;
  }

  /**
   * @param lng lng or {@code null} for none
   */
  public Location setLng(Double lng) {
    this.lng = lng;
    return this;
  }

  @Override
  public Location set(String fieldName, Object value) {
    return (Location) super.set(fieldName, value);
  }

  @Override
  public Location clone() {
    return (Location) super.clone();
  }


    @Override
    public int describeContents() {
        return 0;
    }

    public Location() {

    }

    public Location(Parcel p) {
        lat = p.readDouble();
        lng = p.readDouble();
    }

    @Override
    public void writeToParcel(Parcel p, int flags) {
        p.writeDouble(lat);
        p.writeDouble(lng);
    }

    public static final Parcelable.Creator<Location> CREATOR = new Parcelable.Creator<Location>() {

        @Override
        public Location createFromParcel(Parcel source) {
            return new Location(source);
        }

        @Override
        public Location[] newArray(int size) {
            return new Location[size];
        }
    };

}
